<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  name: "app",
  mounted() {
    this.changeSkin();
  },
  methods: {
    // 换肤
    changeSkin() {
      let theme = localStorage.getItem("theme");
      if (!theme) {
        window.document.documentElement.setAttribute("data-theme", "blue");
      } else {
        window.document.documentElement.setAttribute("data-theme", theme);
      }
    },
  },
};
</script>

<style lang="scss">
#app {
  width: 100%;
  height: 100%;
}
</style>
